'use strict';
var Model = require('../../../Base/server/controllers/Model');

var modelField = {};
modelField.Code = {
    type: String,
    Name: "编码",
    IsUnique: true,
    IsEmpty: false,
    trim: true
};
modelField.Name = {
    type: String,
    NAme: '名称',
    IsEmpty: false,
    trim: true
};
//规格
modelField.Specification = {
    type: String,
    default: '',
    trim: true
};
//料品分类
modelField.ItemCategory = {
    type: Number
};
modelField.IsEffective = {
    type: Boolean
};
//ERP系统里面对应的实体ID
modelField.ErpId = {
    type: String,
    trim: true
};
modelField.Remark = {
    type: String,
    default: '',
    trim: true
};

var newModel = new Model(modelField);
newModel.addIndex({Code: 1});
newModel.addIndex({Name: 1});
newModel.create('ItemMaster', '料品');
